<%@page import="com.etc.zzsys.entiy.Question"%>
<%@page import="com.etc.zzsys.entiy.Users"%>
<%@page import="java.util.List"%>
<%@page import="com.etc.zzsys.service.impl.UsersServiceImpl"%>
<%@page import="com.etc.zzsys.service.UsersService"%>
<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">

<title>zz系统后台管理</title>

<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">

<!-- Custom styles for this template -->
<link href="css/dashboard.css" rel="stylesheet">

</head>

<body>

	<nav class="navbar navbar-inverse navbar-fixed-top">
		<div class="container-fluid">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed"
					data-toggle="collapse" data-target="#navbar" aria-expanded="false"
					aria-controls="navbar">
					<span class="sr-only">Toggle navigation</span> <span
						class="icon-bar"></span> <span class="icon-bar"></span> <span
						class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="#">问答系统后台</a>
			</div>
			<div id="navbar" class="navbar-collapse collapse">
				<ul class="nav navbar-nav navbar-right">
					<li><a href="#">仪表盘</a></li>
					<li><a href="#">设置</a></li>

					<li><a href="#">帮助</a></li>
				</ul>
				<form class="navbar-form navbar-right">
					<input type="text" class="form-control" placeholder="搜搜...">
				</form>
			</div>
		</div>
	</nav>

	<div class="container-fluid">
		<div class="row">
			<div class="col-sm-3 col-md-2 sidebar">
				<ul class="nav nav-sidebar">
					<li><a href="mainPage.jsp">首页 <span class="sr-only">(current)</span></a>
					</li>
					<li><a href="users.jsp">用户列表</a></li>
					<li><a href="addUsers.jsp">新增用户</a></li>
					<li><a href="users_ajax.jsp">用户列表Ajax</a></li>
				</ul>
				<ul class="nav nav-sidebar">
					<li><a href="qs.action?op=queryquestion">问题列表</a></li>
					<li><a href="addQuestion.jsp">新增问题</a></li>
					<li ><a href="qs.action?op=queryquestion_jstl">问题列表[jstl]</a></li>
					<li class="active"><a href="as.action?op=queryans">答案管理</a></li>
					<li><a href="as.action?op=queryansByPage">答案管理[page]</a></li>
				</ul>
				<ul class="nav nav-sidebar">
					<li><a href="">系统设置</a></li>
				</ul>
			</div>
			<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
				<h2 class="sub-header">答案列表[JSTL]</h2>
				<div class="table-responsive">
					<table class="table table-striped table-hover">
						<thead>
							<tr class="text-center">
								<th>问题编号</th>
								<th>问题标题</th>
								<th>回答</th>
								<th>回答用户</th>
								<th>回答日期</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>

							<c:if test="${requestScope.list == null}">
								<jsp:forward page="as.action?op=queryans"></jsp:forward>
							</c:if>

							<c:forEach items="${requestScope.list}" var="a">


								<tr>
									<td>${a.qid}</td>
									<td>${a.title}</td>
									<td>${a.content}</td>
									<td>${a.userName}</td>
									<td>${a.adate}</td>
									<td class="col-md-2"><button class="btn btn-link">修改</button>
										<button class="btn btn-link">删除</button></td>
								</tr>

							</c:forEach>


						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>

	<!-- Bootstrap core JavaScript
    ================================================== -->
	<!-- Placed at the end of the document so the pages load faster -->
	<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
	<script src="js/bootstrap.min.js"></script>

</body>

</html>